import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.Scanner;

public class Update {
    public static int update(Connection connection) throws SQLException {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入修改的sql");
        String sql = sc.nextLine();
        PreparedStatement statement = connection.prepareStatement(sql);
        int n = statement.executeUpdate();
        statement.close();
        return n;
    }
}
